'use strict';

const Controller = require('egg').Controller;
class Chatroom extends Controller {
    async index() {
        const { ctx, app } = this;
        const message = ctx.args[0];
        message.username=ctx.session.username;
        app.io.of('/').emit("returnMsg",message)
    }
}
module.exports = Chatroom